/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.sdd.facades.view;

import com.sdd.entities.FeatureCategory;
import com.sdd.facades.business.FeatureCategoryBusinessFacadeBean;
import com.sdd.facades.factories.FeatureCategoryFactoryFacadeBean;
import com.sdd.plains.FeatureCategoryPlain;
import javax.ejb.EJB;
import javax.ejb.Stateless;

/**
 *
 * @author T
 */
@Stateless
public class FeatureCategoryViewFacadeBean implements FeatureCategoryViewFacade {

    @EJB
    FeatureCategoryBusinessFacadeBean business;
    @EJB
    FeatureCategoryFactoryFacadeBean factory;

    @Override
    public FeatureCategoryPlain getFeatureCategory(long id) {
        FeatureCategory f= business.getFeatureCategory(id);
        return factory.createFeatureCategoryPlain(f);
       
    }

    @Override
    public FeatureCategoryPlain addFeatureCategory(FeatureCategoryPlain featureCategoryPlain) {
        FeatureCategory f = business.addFeature(featureCategoryPlain);
        return factory.createFeatureCategoryPlain(f);
    }
}
